﻿
<%@ Page language="c#" Inherits="Mysoft.Crm.Application.Pages.Tools.FormEditor.Dialogs.Option" CodeBehind="Mysoft.Crm.Application.Pages.Tools.dll" %>
<html>
<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"/>
<title><%= title %></title>
<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
<link rel="stylesheet" type="text/css" href="/_nav/tabs.css">
<link rel="stylesheet" type="text/css" href="/Tools/FormEditor/Styles/dialogs.css">
<script language="javascript" src="/_controls/settings.aspx"></script>
<script language="javascript" src="/_common/scripts/global.js"></script>
<script language="javascript" src="/Tools/FormEditor/Scripts/objects.js"></script>
<script language="javascript" src="/Tools/FormEditor/Scripts/dialogs.js"></script>
<script language="JavaScript">

	function window.onload()
	{
		crmDialog.Value.value	= window.dialogArguments.Value;
		crmDialog.Label.value	= window.dialogArguments.Label;
	}
	
	
	function Ok()
	{
		var sLabel = crmDialog.Label.value = Trim(crmDialog.Label.value);
		
		if (sLabel.length == 0)
		{
			//alert("Enter a value for this label." );
			alert("为这个标识键入一个值。");
			crmDialog.Label.select();
			
			return;
		}
		
		if (sLabel.indexOf('"') > -1 || sLabel.indexOf("'") > -1 || sLabel.indexOf("\\") > -1 || sLabel.indexOf("&") > -1 || sLabel.indexOf('|') > -1 || sLabel.indexOf('<') > -1)
		{
			//alert( "The label cannot contain any of the following characters:" + " \" ' \\ & | <");
			alert("标识不能包含下列字符：" + " \" ' \\ & | <");
			crmDialog.Label.select();

			return;
		}
	
		window.returnValue	= new OptionObj(
								crmDialog.Value.value,
								new Array(new LocalizedObj(sLabel, ORG_LANGUAGE_CODE))
							);
		
		window.close();
	}
	
</script>
</head>
<body>
	<form name="crmDialog">
		<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
			<tr>
				<td class="header">
					<div class="header"><%= title %></div>
					<div class="headerdesc"><%= description %></div>
				</td>
			</tr>
			<tr>
				<td class="main">
					<table cellpadding="0" cellspacing="5" width="100%" style="table-layout: fixed;">
						<col width="50"><col>
						<tr>
							<td><!-Value->数值</td>
							<td><input name="Value" type="text" disabled></td>
						</tr>
						<tr>
							<td class="req"><!-Label->标识</td>
							<td><input name="Label" type="text"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td class="buttons">
					<button id="btnDialogOk" onclick="Ok();">确定</button>
					<span>&nbsp;</span>
					<button id="btnDialogCancel" onclick="Cancel();">取消</button>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>